package com.magical.dao;

import com.magical.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    User selectByEmail(String email);

    int insertUser(@Param("name") String name, @Param("email") String email, @Param("password") String password);

    List<User> selectAllUserMessage();

    int updateByPrimaryKey(@Param("id") int id,@Param("email") String email, @Param("authority") int authority,@Param("grade") int grade);

}